﻿<phone:PhoneApplicationPage x:Class="PostIt.AddTasks"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:data="clr-namespace:PostIt"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <Grid.Resources>
            <data:AccentColorNameToBrush x:Key="ColorNameToBrushConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>


        <StackPanel Orientation="Vertical">

            <toolkit:PhoneTextBox Name="txtTitle"
                                  Hint="Title" />
            <toolkit:PhoneTextBox Name="txtTile"
                                  Hint="Tile Text"
                                  MaxLength="10"
                                  DisplayedMaxLength="10"
                                  LengthIndicatorVisible="True"
                                 />
            <TextBlock Text="Detail"
                       Foreground="{StaticResource PhoneSubtleBrush}"
                       Margin="12, 0,0,0" />
            <toolkit:PhoneTextBox x:Name="txtDetail"
                                  MinHeight="200"
                                  DisplayedMaxLength="200"
                                  LengthIndicatorVisible="True"
                                  TextWrapping="Wrap"
                                  AcceptsReturn="True"                            
                                  Height="166"
                                  RenderTransformOrigin="0.521,0.175" />
            <!-- Note: the following allows for the user to enter more than 
                        500 characters, but the length indicator displays the
                        number of characters entered out of 500, even if the length
                        of the text entered is greater than 500.      -->

        </StackPanel>
        <TextBlock Text="Due date"
                   Foreground="{StaticResource PhoneSubtleBrush}"
                   Margin="10,10,20,253"
                   Grid.Row="1" />
        <toolkit:DatePicker Name="DueDateBox"
                            Margin="0,41,0,201"
                            Grid.Row="1" />
        <toolkit:ListPicker Name="txtColor"
                            ItemsSource="{Binding}"
                            Header="Accent color"
                            FullModeHeader="ACCENTS"
                            CacheMode="BitmapCache"
                            Margin="10,98,14,95"
                            Grid.Row="1">
            <toolkit:ListPicker.ItemTemplate>

                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="{Binding Converter={StaticResource ColorNameToBrushConverter}}"
                                   Width="24"
                                   Height="24" />
                        <TextBlock Text="{Binding}"
                                   Margin="12 0 0 0" />
                    </StackPanel>
                </DataTemplate>
            </toolkit:ListPicker.ItemTemplate>
            <toolkit:ListPicker.FullModeItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal"
                                Margin="0 21 0 20">
                        <Rectangle Fill="{Binding Converter={StaticResource ColorNameToBrushConverter}}"
                                   Width="43"
                                   Height="43" />
                        <TextBlock Text="{Binding}"
                                   Margin="16 0 0 0"
                                   FontSize="43"
                                   FontFamily="{StaticResource PhoneFontFamilyLight}" />
                    </StackPanel>
                </DataTemplate>
            </toolkit:ListPicker.FullModeItemTemplate>
        </toolkit:ListPicker>
        <!--ContentPanel - place additional content here-->
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True"
                              IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.save.rest.png"
                                            Text="Save"
                                            Click="ApplicationBarIconButton_Click_1" />


            <!--<shell:ApplicationBarMenuItem Text="MenuItem 1" />-->

            <!--</shell:ApplicationBar.MenuItems>-->
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>